package com.techstar.ats.codec.history.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.Decoder;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.history.F17GroupStatus;
import com.techstar.ats.type.LocationDepotType;

public enum F17GroupStatusDecoder implements Decoder<F17GroupStatus> {
	INSTANCE;

	public F17GroupStatus create() {
		return new F17GroupStatus();
	}

	public void decode(ByteBuf buf, F17GroupStatus value) {
		value.group = (new StringCodec(9)).get(buf);
		value.depot = LocationDepotType.valueOf(buf.readUnsignedByte());
		value.status = (new StringCodec(42)).get(buf);
	}
}
